<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
</head>
<body>
    <!-- 宿主文件 -->
    <div id="app">
        <h2>
            <!-- 插值文本 -->
            {{title}}
        </h2>
    </div>
    <!-- 可以这样使用最新版本vue.js -->
    <script src="vue.min.js"></script>

    <script>
    //1.创建vue实例
    const app = new Vue({
        el: '#app',
        data() {
            return {
                title: 'hello, vue!'
            }
        },
    })
    // 设置时间间隔
    setTimeout(() => {
        app.title = 'ok, vue!'
    }, 1000);
    </script>
</body>
</html>